<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<html>
<head>
<title>DEV Information Page</title>
</head>
<body>
	<c:if test="${empty userLoggin }">
		<c:redirect url="${pageContext.request.contextPath}"/>
	</c:if>	
	<div style="padding-left: 150px;">
		<h3 style="text-align: right;"> Welcome ${PMInfo.username} | 
			<a href="${pageContext.request.contextPath}">Logout</a> | 
			<a href="${pageContext.request.contextPath}/">Change Password</a>
		</h3>
		<table style="font-size: 15pt">
			<tbody>
				<tr>
					<td>Project</td>
					<td>
						<c:forEach items="${PMInfo.projectUsers}" var="projects">
							${projects.project.code}
							<c:set var="projectCode" value="${projects.project.code}"></c:set>
						</c:forEach>
					</td>
				</tr>
				<tr>
					<td>Full Name</td>
					<td>${PMInfo.fullname}</td>
				</tr>
				<tr>
					<td>Address</td>
					<td>${PMInfo.address}</td>
				</tr>
				<tr>
					<td>Phone</td>
					<td>${PMInfo.phone}</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: right; padding-top: 10px;">
						<a href="${pageContext.request.contextPath}/updatePM/${PMInfo.username}">Update Information</a>
					</td>
				</tr>
			</tbody>

		</table>
	</div>
	<div align="center" style="padding-top: 50px;">
		<h1>List of Developer in Project</h1>
		<form action="" method="POST">
			<table style="font-size: 15pt" border="1">
				<thead>
					<tr>
						<th>No.</th>
						<th>Username</th>
						<th>Full Name</th>
						<th>Address</th>
						<th>Phone</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
					
					<c:forEach items="${listUnprojectUsers}" var="user" varStatus="count">
							<tr>
								<td>${count.count}</td>
								<td>${user.username}</td>
								<td>${user.fullname}</td>
								<td>${user.address}</td>
								<td>${user.phone}</td>
								<td><a
									href="${pageContext.request.contextPath}/unprojectDEV/${PMInfo.username}/${user.username}/${projectCode}">Assign</a></td>
							</tr>
					</c:forEach>
				</tbody>

			</table>
			
		</form>
	</div>
</body>
</html>
